﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<InfoTech.Mvc.LanTranh.MucVu.Models.SOHONNHANModel>" %>
<%@ Import Namespace="InfoTech.LanTranh.MucVu.Service" %>
<div class="honnhan">
    <%
        Html.EnableClientValidation(); %>
    <% 
        using (Html.BeginForm("UpdateSoHonNhan", "GiaDinhCongGiao"))
        {%>
    <%:Html.ValidationSummary()%>
    <%:Html.HiddenFor(c=>c.MAHONNHAN) %>
    <%:Html.HiddenFor(c=>c.MAGIAODAN_CHONG) %>
    <%:Html.HiddenFor(c=>c.TENCHONG) %>
    <%:Html.HiddenFor(c=>c.SEX) %>
    <%:Html.HiddenFor(c=>c.UPDATE) %>
    <table cellspacing="3" cellpadding="3">
        <tr>
            <td align="right" class="cellTitle" valign="middle">
                Sổ Hôn Nhân số:
            </td>
            <td>
                <div class="editor-field">
                    <div class="editor-field">
                        <%: Html.TextBoxFor(model => model.MASO, new { style = "width: 200px", @class="text-input" })%>
                        <%: Html.ValidationMessageFor(model => model.MASO, "(*)")%>
                    </div>
                </div>
            </td>
        </tr>
        <tr>
            <td align="right" class="cellTitle" valign="middle">
                Ngày
            </td>
            <td colspan="4">
                <div class="editor-field">
                    <table cellpadding="0" cellspacing="0">
                        <tr>
                            <td>
                                <div class="editor-field">
                                    <%: Html.DropDownListFor(model => model.NGAY,GIAODANService.Get_List_Days(), new { style = "width: 140px", @class="text-input" })%>
                                    <%: Html.ValidationMessageFor(model => model.NGAY, "(*)")%>
                                </div>
                            </td>
                            <td>
                                <div class="editor-field">
                                    <%: Html.DropDownListFor(model => model.THANG,GIAODANService.Get_List_Months(), new { style = "width: 145px", @class="text-input" })%>
                                    <%: Html.ValidationMessageFor(model => model.THANG, "(*)")%>
                                </div>
                            </td>
                            <td>
                                <div class="editor-field">
                                    <%: Html.DropDownListFor(model => model.NAM,GIAODANService.Get_List_Years(), new { style = "width: 135px", @class="text-input" })%>
                                    <%: Html.ValidationMessageFor(model => model.NAM, "(*)")%>
                                </div>
                            </td>
                        </tr>
                    </table>
                </div>
            </td>
            <td>
                &nbsp;
            </td>
        </tr>
        <tr>
            <td align="right" class="cellTitle" valign="middle">
                Kết Hôn Với Chị
            </td>
            <td>
                <div class="editor-field">
                    <%: Html.HiddenFor(model => model.MAGIAODAN_VO)%>
                    <%: Html.TextBoxFor(model => model.TENVO, new { style = "width: 200px", @class="text-input" })%>
                    <%: Html.ValidationMessageFor(model => model.TENVO, "(*)")%>
                </div>
            </td>
            <td>
                <img src="<%=Html.AreaImagesPath("AdminCP")%>search.png" style="cursor: pointer"
                    onclick="javascript:TimVo();" />
            </td>
            <td align="right" class="cellTitle" valign="middle">
                Tôn giáo
            </td>
            <td>
                <div class="editor-field">
                    <%:Html.DropDownListFor(c=>c.MATONGIAO,TONGIAOService.Get_List(), new { style = "width: 200px", @class="text-input" })%>
                    <%: Html.ValidationMessageFor(model => model.MATONGIAO, "(*)")%>
                </div>
            </td>
            <td>
                &nbsp;
            </td>
        </tr>
        <tr>
            <td align="right" class="cellTitle" valign="middle">
                Con Ông
            </td>
            <td>
                <div class="editor-field">
                    <%: Html.TextBoxFor(model => model.TENCHA, new { style = "width: 200px", @class="text-input" })%>
                    <%: Html.ValidationMessageFor(model => model.TENCHA, "(*)")%>
                </div>
            </td>
            <td>
            </td>
            <td align="right" class="cellTitle" valign="middle">
                Nhân Chứng 1
            </td>
            <td>
                <div class="editor-field">
                    <%: Html.HiddenFor(model => model.MANHANCHUNG1)%>
                    <%: Html.TextBoxFor(model => model.TENNHANCHUNG1, new { style = "width: 200px", @class="text-input" })%>
                    <%: Html.ValidationMessageFor(model => model.TENNHANCHUNG1, "(*)")%>
                </div>
            </td>
            <td width="32">
                <img src="<%=Html.AreaImagesPath("AdminCP")%>search.png" style="cursor: pointer"
                    onclick="javascript:TimNhanChung1();" />
            </td>
        </tr>
        <tr>
            <td align="right" class="cellTitle" valign="middle">
                Và Bà
            </td>
            <td>
                <div class="editor-field">
                    <%: Html.TextBoxFor(model => model.TENME, new { style = "width: 200px", @class="text-input" })%>
                    <%: Html.ValidationMessageFor(model => model.TENME, "(*)")%>
                </div>
            </td>
            <td>
            </td>
            <td align="right" class="cellTitle" valign="middle">
                Nhân Chứng 2
            </td>
            <td>
                <div class="editor-field">
                    <%: Html.HiddenFor(model => model.MANHANCHUNG2)%>
                    <%: Html.TextBoxFor(model => model.TENNHANCHUNG2, new { style = "width: 200px", @class="text-input" })%>
                    <%: Html.ValidationMessageFor(model => model.TENNHANCHUNG2, "(*)")%>
                </div>
            </td>
            <td width="32">
                <img src="<%=Html.AreaImagesPath("AdminCP")%>search.png" style="cursor: pointer"
                    onclick="javascript:TimNhanChung2();" />
            </td>
        </tr>
        <tr>
            <td align="right" class="cellTitle" valign="middle">
                Tại
            </td>
            <td colspan="4">
                <div class="editor-field">
                    <%: Html.TextBoxFor(model => model.DIACHI, new { style = "width: 545px", @class="text-input" })%>
                    <%: Html.ValidationMessageFor(model => model.DIACHI, "(*)")%>
                </div>
            </td>
            <td>
                &nbsp;
            </td>
        </tr>
        <tr>
            <td align="right" class="cellTitle" valign="middle">
                Do Linh Mục
            </td>
            <td>
                <div class="editor-field">
                    <%: Html.HiddenFor(model => model.MALINHMUC)%>
                    <%: Html.TextBoxFor(model => model.TENLINHMUC, new { style = "width: 200px", @class="text-input" })%>
                    <%: Html.ValidationMessageFor(model => model.TENLINHMUC, "(*)")%>
                </div>
            </td>
            <td width="32">
                <img src="<%=Html.AreaImagesPath("AdminCP")%>search.png" style="cursor: pointer"
                    onclick="javascript:TimLinhMuc1();" />
            </td>
            <td align="right" class="cellTitle" valign="middle">
                &nbsp;
            </td>
            <td>
                &nbsp;
            </td>
            <td>
                &nbsp;
            </td>
        </tr>
        <tr>
            <td align="right" class="cellTitle" valign="middle" nowrap="nowrap">
                Hiện Trạng Hôn nhân
            </td>
            <td>
                <div class="editor-field">
                    <%:Html.DropDownListFor(c => c.MAHIENTRANGHONNHAN, HIENTRANGHONNHANService.Get_List(), new { style = "width: 200px", @class = "text-input" })%>
                    <%: Html.ValidationMessageFor(model => model.MAHIENTRANGHONNHAN, "(*)")%>
                </div>
            </td>
            <td width="32">
            </td>
            <td align="right" class="cellTitle" valign="middle">
                &nbsp;
            </td>
            <td>
                &nbsp;
            </td>
            <td>
                &nbsp;
            </td>
        </tr>
        <tr>
            <td align="right" class="cellTitle" valign="middle">
                Không Lưu Sổ
            </td>
            <td>
                <%:Html.CheckBoxFor(c=>c.LUUSO) %>
            </td>
            <td width="32">
                &nbsp;
            </td>
            <td align="right" class="cellTitle" valign="middle">
                &nbsp;
            </td>
            <td>
                &nbsp;
            </td>
            <td>
                &nbsp;
            </td>
        </tr>
        <tr>
            <td class="lineRow" colspan="6">
            </td>
        </tr>
        <tr>
            <td align="right" class="cellTitle" valign="middle">
            </td>
            <td colspan="4">
                <input type="submit" value="Cập nhật" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" />
            </td>
            <td>
                &nbsp;
            </td>
        </tr>
    </table>
    <%
        }%>
</div>
<script language="javascript" type="text/javascript">
    function TimVo() {
        Dialog('<%=Url.Action("TimVo","GiaDinhCongGiao") %>', '', 'Kết Hôn Với', 1000, 335, HideDialog, ClearDataTimVo);
    }
    function ClearDataTimVo() {
        $('#MAGIAODAN_VO').val('');
        $('#TENVO').val('');
        ClearChaMe();
    }
    function ReceiveVo(id, name) {
        $('#MAGIAODAN_VO').val(id);
        $('#TENVO').val(name);
        GetChaMe(id);
    }   
</script>
